using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UIDM4WheelLegRobot : UIDataManager
{
    private WheelLegRobotController controller;
    private WheelLegRobot robot;
    protected override void Start()
    {
        base.Start();
        controller = (WheelLegRobotController)this.control_target;
        robot = (WheelLegRobot)controller.control_target;
    }
    private string output_float(float value)
    {
        return $"{value:F5}";
    }
    protected override void Loop()
    {
        base.Loop();
        showers[0].text_value.text = output_float(robot.LeftWheel.speed);
        showers[1].text_value.text = output_float(robot.RightWheel.speed);
        var v3 = IMU.Euler(controller.data.rotation);
        showers[2].text_value.text= output_float(v3.y);
        showers[3].text_value.text = output_float(v3.x);
        showers[4].text_value.text = output_float(v3.z);
        showers[5].text_value.text = output_float(controller.data.velocity.magnitude);




    }
}
